home *** CD-ROM | disk | FTP | other *** search
/ Yellows - Privacy (Deluxe) / Akira Gomi Photographs - Yellows: Privacy (Deluxe) - Disc 1.iso / mono / q.dxr / 00080.ls < prev    next >
Encoding:
Text File  |  1996-07-06  |  11.2 KB  |  376 lines

  1. global amonopict, bmonopict, cmonopict, apictlist, bpictlist, cpictlist, textnum, textlist, spnumlist, changelist, layoutnum, vspritelist, mode, captionmode, keydetect, event
  2.  
  3. on startMovie
  4.   global keydetect
  5.   if objectp(keydetect) then
  6.     keydetect(mdispose)
  7.   end if
  8.   if objectp(event) then
  9.     event(mdispose)
  10.   end if
  11.   set event to getnextevent(mnew)
  12.   set keydetect to keydetector(mnew)
  13.   inits()
  14.   init()
  15. end
  16.  
  17. on inits
  18.   set amonopict to 7
  19.   set bmonopict to 9
  20.   set cmonopict to 9
  21.   set textnum to 8
  22.   set apictlist to []
  23.   set bpictlist to []
  24.   set cpictlist to []
  25.   set textlist to []
  26.   set vspritelist to []
  27.   repeat with i = 1 to amonopict
  28.     add(apictlist, i)
  29.   end repeat
  30.   repeat with i = 1 to bmonopict
  31.     add(bpictlist, i)
  32.   end repeat
  33.   repeat with i = 1 to cmonopict
  34.     add(cpictlist, i)
  35.   end repeat
  36.   repeat with i = 1 to textnum
  37.     add(textlist, i)
  38.   end repeat
  39.   puppetSprite(3, 1)
  40.   set the ink of sprite 3 to 0
  41.   set the type of sprite 3 to 1
  42.   set the foreColor of sprite 3 to 255
  43.   set the backColor of sprite 3 to 0
  44.   set the locH of sprite 3 to 429
  45.   set the locV of sprite 3 to 240
  46.   repeat with i = 10 to 12
  47.     puppetSprite(i, 1)
  48.     set the ink of sprite i to 0
  49.     set the type of sprite i to 1
  50.     set the foreColor of sprite i to 255
  51.     set the backColor of sprite i to 0
  52.     set the visible of sprite i to 0
  53.   end repeat
  54. end
  55.  
  56. on initlista
  57.   repeat with i = 1 to amonopict
  58.     add(apictlist, i)
  59.   end repeat
  60. end
  61.  
  62. on initlistb
  63.   repeat with i = 1 to bmonopict
  64.     add(bpictlist, i)
  65.   end repeat
  66. end
  67.  
  68. on initlistc
  69.   repeat with i = 1 to cmonopict
  70.     add(cpictlist, i)
  71.   end repeat
  72. end
  73.  
  74. on inittext
  75.   repeat with i = 1 to textnum
  76.     add(textlist, i)
  77.   end repeat
  78. end
  79.  
  80. on settext
  81.   set text to getAt(textlist, random(count(textlist)))
  82.   deleteAt(textlist, getPos(textlist, text))
  83.   puppetSprite(9, 1)
  84.   set the ink of sprite 9 to 0
  85.   set the type of sprite 9 to 1
  86.   set the foreColor of sprite 9 to 255
  87.   set the backColor of sprite 9 to 0
  88.   set the castNum of sprite 9 to the number of member ("text" & text & captionmode)
  89.   set the locH of sprite 9 to 109
  90.   set the locV of sprite 9 to 240
  91. end
  92.  
  93. on textchange
  94.   judgelist()
  95.   set text to getAt(textlist, random(count(textlist)))
  96.   deleteAt(textlist, getPos(textlist, text))
  97.   set the castNum of sprite 9 to the number of member ("text" & text & captionmode)
  98.   set the locH of sprite 9 to 109
  99.   set the locV of sprite 9 to 240
  100.   updateStage()
  101. end
  102.  
  103. on layout1
  104.   set spnumlist to [10, 11, 12]
  105.   set changelist to [10, 11, 12]
  106.   judgelist()
  107.   set c1 to getAt(cpictlist, random(count(cpictlist)))
  108.   deleteAt(cpictlist, getPos(cpictlist, c1))
  109.   if cpictlist = [] then
  110.     initlistc()
  111.     deleteAt(cpictlist, getPos(cpictlist, c1))
  112.   end if
  113.   set c2 to getAt(cpictlist, random(count(cpictlist)))
  114.   deleteAt(cpictlist, getPos(cpictlist, c2))
  115.   judgelist()
  116.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  117.   deleteAt(bpictlist, getPos(bpictlist, b1))
  118.   set the castNum of sprite 10 to the number of member ("C" & c1)
  119.   set the locH of sprite 10 to 359
  120.   set the locV of sprite 10 to 128
  121.   set the castNum of sprite 11 to the number of member ("B" & b1)
  122.   set the locH of sprite 11 to 556
  123.   set the locV of sprite 11 to 329
  124.   set the castNum of sprite 12 to the number of member ("C" & c2)
  125.   set the locH of sprite 12 to 331
  126.   set the locV of sprite 12 to 333
  127. end
  128.  
  129. on layout2
  130.   set spnumlist to [10, 11, 12]
  131.   set changelist to [10, 11, 12]
  132.   judgelist()
  133.   set c1 to getAt(cpictlist, random(count(cpictlist)))
  134.   deleteAt(cpictlist, getPos(cpictlist, c1))
  135.   if cpictlist = [] then
  136.     initlistc()
  137.     deleteAt(cpictlist, getPos(cpictlist, c1))
  138.   end if
  139.   set c2 to getAt(cpictlist, random(count(cpictlist)))
  140.   deleteAt(cpictlist, getPos(cpictlist, c2))
  141.   judgelist()
  142.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  143.   deleteAt(bpictlist, getPos(bpictlist, b1))
  144.   set the castNum of sprite 10 to the number of member ("C" & c1)
  145.   set the locH of sprite 10 to 331
  146.   set the locV of sprite 10 to 148
  147.   set the castNum of sprite 12 to the number of member ("B" & b1)
  148.   set the locH of sprite 12 to 555
  149.   set the locV of sprite 12 to 152
  150.   set the castNum of sprite 11 to the number of member ("C" & c2)
  151.   set the locH of sprite 11 to 358
  152.   set the locV of sprite 11 to 353
  153. end
  154.  
  155. on layout3
  156.   set spnumlist to [10, 11, 12]
  157.   set changelist to [10, 11, 12]
  158.   judgelist()
  159.   set c1 to getAt(cpictlist, random(count(cpictlist)))
  160.   deleteAt(cpictlist, getPos(cpictlist, c1))
  161.   judgelist()
  162.   set a1 to getAt(apictlist, random(count(apictlist)))
  163.   deleteAt(apictlist, getPos(apictlist, a1))
  164.   judgelist()
  165.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  166.   deleteAt(bpictlist, getPos(bpictlist, b1))
  167.   set the castNum of sprite 10 to the number of member ("C" & c1)
  168.   set the locH of sprite 10 to 331
  169.   set the locV of sprite 10 to 88
  170.   set the castNum of sprite 11 to the number of member ("B" & b1)
  171.   set the locH of sprite 11 to 331
  172.   set the locV of sprite 11 to 318
  173.   set the castNum of sprite 12 to the number of member ("A" & a1)
  174.   set the locH of sprite 12 to 541
  175.   set the locV of sprite 12 to 328
  176. end
  177.  
  178. on layout4
  179.   set spnumlist to [10, 11, 12]
  180.   set changelist to [10, 11, 12]
  181.   judgelist()
  182.   set c1 to getAt(cpictlist, random(count(cpictlist)))
  183.   deleteAt(cpictlist, getPos(cpictlist, c1))
  184.   judgelist()
  185.   set a1 to getAt(apictlist, random(count(apictlist)))
  186.   deleteAt(apictlist, getPos(apictlist, a1))
  187.   judgelist()
  188.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  189.   deleteAt(bpictlist, getPos(bpictlist, b1))
  190.   set the castNum of sprite 10 to the number of member ("C" & c1)
  191.   set the locH of sprite 10 to 331
  192.   set the locV of sprite 10 to 391
  193.   set the castNum of sprite 11 to the number of member ("B" & b1)
  194.   set the locH of sprite 11 to 331
  195.   set the locV of sprite 11 to 162
  196.   set the castNum of sprite 12 to the number of member ("A" & a1)
  197.   set the locH of sprite 12 to 542
  198.   set the locV of sprite 12 to 151
  199. end
  200.  
  201. on layout5
  202.   set spnumlist to [10, 11, 12]
  203.   set changelist to [10, 11, 12]
  204.   judgelist()
  205.   set c1 to getAt(cpictlist, random(count(cpictlist)))
  206.   deleteAt(cpictlist, getPos(cpictlist, c1))
  207.   judgelist()
  208.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  209.   deleteAt(bpictlist, getPos(bpictlist, b1))
  210.   if bpictlist = [] then
  211.     initlistb()
  212.     deleteAt(bpictlist, getPos(bpictlist, b1))
  213.   end if
  214.   set b2 to getAt(bpictlist, random(count(bpictlist)))
  215.   deleteAt(bpictlist, getPos(bpictlist, b2))
  216.   set the castNum of sprite 10 to the number of member ("B" & b1)
  217.   set the locH of sprite 10 to 303
  218.   set the locV of sprite 10 to 113
  219.   set the castNum of sprite 11 to the number of member ("B" & b2)
  220.   set the locH of sprite 11 to 331
  221.   set the locV of sprite 11 to 367
  222.   set the castNum of sprite 12 to the number of member ("C" & c1)
  223.   set the locH of sprite 12 to 528
  224.   set the locV of sprite 12 to 165
  225. end
  226.  
  227. on layout6
  228.   set spnumlist to [10, 11, 12]
  229.   set changelist to [10, 11, 12]
  230.   judgelist()
  231.   set c1 to getAt(cpictlist, random(count(cpictlist)))
  232.   deleteAt(cpictlist, getPos(cpictlist, c1))
  233.   judgelist()
  234.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  235.   deleteAt(bpictlist, getPos(bpictlist, b1))
  236.   if bpictlist = [] then
  237.     initlistb()
  238.     deleteAt(bpictlist, getPos(bpictlist, b1))
  239.   end if
  240.   set b2 to getAt(bpictlist, random(count(bpictlist)))
  241.   deleteAt(bpictlist, getPos(bpictlist, b2))
  242.   set the castNum of sprite 10 to the number of member ("B" & b1)
  243.   set the locH of sprite 10 to 331
  244.   set the locV of sprite 10 to 113
  245.   set the castNum of sprite 11 to the number of member ("B" & b2)
  246.   set the locH of sprite 11 to 303
  247.   set the locV of sprite 11 to 367
  248.   set the castNum of sprite 12 to the number of member ("C" & c1)
  249.   set the locH of sprite 12 to 528
  250.   set the locV of sprite 12 to 314
  251. end
  252.  
  253. on layout7
  254.   set spnumlist to [10, 11, 12]
  255.   set changelist to [10, 11, 12]
  256.   judgelist()
  257.   set c1 to getAt(cpictlist, random(count(cpictlist)))
  258.   deleteAt(cpictlist, getPos(cpictlist, c1))
  259.   judgelist()
  260.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  261.   deleteAt(bpictlist, getPos(bpictlist, b1))
  262.   if bpictlist = [] then
  263.     initlistb()
  264.     deleteAt(bpictlist, getPos(bpictlist, b1))
  265.   end if
  266.   set b2 to getAt(bpictlist, random(count(bpictlist)))
  267.   deleteAt(bpictlist, getPos(bpictlist, b2))
  268.   set the castNum of sprite 10 to the number of member ("B" & b1)
  269.   set the locH of sprite 10 to 330
  270.   set the locV of sprite 10 to 367
  271.   set the castNum of sprite 11 to the number of member ("B" & b2)
  272.   set the locH of sprite 11 to 528
  273.   set the locV of sprite 11 to 340
  274.   set the castNum of sprite 12 to the number of member ("C" & c1)
  275.   set the locH of sprite 12 to 331
  276.   set the locV of sprite 12 to 138
  277. end
  278.  
  279. on layout8
  280.   set spnumlist to [10, 11]
  281.   set changelist to [10, 11]
  282.   judgelist()
  283.   set a1 to getAt(apictlist, random(count(apictlist)))
  284.   deleteAt(apictlist, getPos(apictlist, a1))
  285.   if apictlist = [] then
  286.     initlista()
  287.     deleteAt(apictlist, getPos(apictlist, a1))
  288.   end if
  289.   set a2 to getAt(apictlist, random(count(apictlist)))
  290.   deleteAt(apictlist, getPos(apictlist, a2))
  291.   set the castNum of sprite 10 to the number of member ("A" & a1)
  292.   set the locH of sprite 10 to 316
  293.   set the locV of sprite 10 to 179
  294.   set the castNum of sprite 11 to the number of member ("A" & a2)
  295.   set the locH of sprite 11 to 541
  296.   set the locV of sprite 11 to 301
  297.   set the visible of sprite 12 to 0
  298. end
  299.  
  300. on layout9
  301.   set spnumlist to [10, 11, 12]
  302.   set changelist to [10, 11, 12]
  303.   judgelist()
  304.   set a1 to getAt(apictlist, random(count(apictlist)))
  305.   deleteAt(apictlist, getPos(apictlist, a1))
  306.   judgelist()
  307.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  308.   deleteAt(bpictlist, getPos(bpictlist, b1))
  309.   if bpictlist = [] then
  310.     initlistb()
  311.     deleteAt(bpictlist, getPos(bpictlist, b1))
  312.   end if
  313.   set b2 to getAt(bpictlist, random(count(bpictlist)))
  314.   deleteAt(bpictlist, getPos(bpictlist, b2))
  315.   set the castNum of sprite 10 to the number of member ("A" & a1)
  316.   set the locH of sprite 10 to 316
  317.   set the locV of sprite 10 to 291
  318.   set the castNum of sprite 11 to the number of member ("B" & b1)
  319.   set the locH of sprite 11 to 528
  320.   set the locV of sprite 11 to 113
  321.   set the castNum of sprite 12 to the number of member ("B" & b2)
  322.   set the locH of sprite 12 to 528
  323.   set the locV of sprite 12 to 367
  324. end
  325.  
  326. on judgelist
  327.   if apictlist = [] then
  328.     initlista()
  329.   end if
  330.   if bpictlist = [] then
  331.     initlistb()
  332.   end if
  333.   if cpictlist = [] then
  334.     initlistc()
  335.   end if
  336.   if textlist = [] then
  337.     inittext()
  338.   end if
  339. end
  340.  
  341. on showsprite
  342.   set a to random(count(spnumlist))
  343.   if a = 1 then
  344.     nothing()
  345.   else
  346.     set a to a - 1
  347.   end if
  348.   repeat with i = 1 to a
  349.     set spnum to getAt(spnumlist, random(count(spnumlist)))
  350.     deleteAt(spnumlist, getPos(spnumlist, spnum))
  351.     add(vspritelist, spnum)
  352.   end repeat
  353.   repeat with i = 1 to count(vspritelist)
  354.     set the visible of sprite getAt(vspritelist, i) to 1
  355.   end repeat
  356. end
  357.  
  358. on judgename castname
  359.   judgelist()
  360.   if castname = "A" then
  361.     set castNum to getAt(apictlist, random(count(apictlist)))
  362.     deleteAt(apictlist, getPos(apictlist, castNum))
  363.     return castNum
  364.   end if
  365.   if castname = "B" then
  366.     set castNum to getAt(bpictlist, random(count(bpictlist)))
  367.     deleteAt(bpictlist, getPos(bpictlist, castNum))
  368.     return castNum
  369.   end if
  370.   if castname = "C" then
  371.     set castNum to getAt(cpictlist, random(count(cpictlist)))
  372.     deleteAt(cpictlist, getPos(cpictlist, castNum))
  373.     return castNum
  374.   end if
  375. end
  376.